from org.jyrcp.base import Platform
if Platform.PLATFORM == 'RCP':
    from org.eclipse.ui.application import WorkbenchAdvisor, WorkbenchWindowAdvisor
else:
    from org.eclipse.ui.entrypoint import WorkbenchAdvisor, WorkbenchWindowAdvisor
    

class JyRCPWorkbenchAdvisor(WorkbenchAdvisor):
    def createWorkbenchWindowAdvisor(self, configurer):
        return JyRCPWorkbenchWindowAdvisor(configurer)
        
    def getInitialWindowPerspectiveId(self):
        return 'org.jyrcp.base.perspectives.default'

    
from org.eclipse.swt.graphics import Point
from workbench.action_bar import JyRCPActionBarAdvisor

class JyRCPWorkbenchWindowAdvisor(WorkbenchWindowAdvisor):

    def createActionBarAdvisor(self, configurer):
        return JyRCPActionBarAdvisor(configurer)
     
    def preWindowOpen(self):        
        configurer = self.getWindowConfigurer()
        configurer.initialSize = Point(800, 600)
        configurer.showCoolBar = False
        #configurer.showStatusLine = False
        configurer.title = 'JyRCP Demo' 
    